#include "sq_stack.h"
#include "../test.h"
#include <stdio.h>

int main()
{
	void *ep;
	sq_stack s;
	struct mydata elem = {18,'z'},ee = {14,'e'}, e0,
		e1 = {19,'a'},e2 = {18,'z'},e3 = {1,'s'}, e4 = {9,'k'};

	sqstack_init(&s, sizeof(struct mydata));
	
	push(&s, (void*) &e1, sizeof(struct mydata));
	push(&s, (void*) &e2, sizeof(struct mydata));
	push(&s, (void*) &e3, sizeof(struct mydata));
	pop(&s, (void*) &e0, sizeof(struct mydata));

	visit((void *)&e0);
	
	sqstack_traverse(&s, visit, sizeof(struct mydata));
	printf("\n%d\n",sqstack_length(&s, sizeof(struct mydata)));

}
